1. Field of the Invention
The present invention generally relates to the design of adaptive computer display layout managers and, more particularly, to a method for designing and utilizing display elements that allows a layout manager to arrange and pack display elements to improve screen appearance, especially when displaying the components on a screen of unknown size.
2. Background Description
The invention is an innovation in the design of xe2x80x9clayout managers.xe2x80x9d Layout managers are computing tools for arranging xe2x80x9celementsxe2x80x9d in a computer display. Elements are pictures, buttons, blocks of text, or other graphics which may be passive or active. Passive elements are for viewing only. Active elements may cause a change in appearance or behavior when stimulated by the action of a person viewing the display. These are the fundamental, abstract components of every display-based human-computer interface.
Layout managers function by finding the size of the elements of the display and positioning them according to a predetermined method. Some layout managers align their elements in a row or a column. Others assign elements to a predetermined areas, such as the top, bottom, left, right, or center.
When a layout manager arranges elements, it often creates areas not occupied by any element. This is especially true if the elements are not uniform in size. Layout managers will typically enlarge elements in one dimension to fill the unused areas. A layout manager which places a narrow element above a wide element might make the narrow element wider to keep the elements uniform in width. That action may leave the narrow element with more height than it requires.
To illustrate the problem, consider the following. We have a title element whose content is xe2x80x9cAutoLoan Exchange.xe2x80x9d The element preferably stacks the words xe2x80x9cAutoLoanxe2x80x9d above the word xe2x80x9cExchange.xe2x80x9d It is eight characters wide and two lines high. A layout manager assigns a wider, thirty-character width. Now, the entire title fits on one line, but the element height remains at two lines.
Poor packing of display elements gives a poor aesthetic impression, wastes space available on the screen, and impairs understanding of the interface. Accordingly, authors invest a large amount of time hand crafting the layout of each screen in an application, at high cost per screen.
It is therefore an object of the invention to provide a layout manager to automatically adapt to changes in the size of the display and achieve an aesthetically pleasing appearance.
According to the invention, elements which are specially designed to answer element size queries enable an enhanced layout manager to pack elements on the display with greater uniformity and density than is possible with the element size queries available in the state of the art. The invention uses height-for-width and/or width-for-height trade-offs to allow the optimal resizing of said elements.
A layout manager determines the size of elements to be displayed by querying the elements. Prior art has established three queries by which a layout manager determines the size of each element. These are the element minimum, maximum, and preferred size in height and width. We add two additional preferred size queries: xe2x80x9cpreferred height given widthxe2x80x9d and xe2x80x9cpreferred width given height.xe2x80x9d
A layout manager may now adjust the width of an element and, at the same time, revise its height. A layout manager may also adjust the height of an element, and, at the same time, revise its width. A layout manager which takes advantage of this capability is described in concurrently filed, copending application Ser. No. 09/290,165.
The queries in the state of the art do not relate preferred width to preferred height. This means that elements cannot adjust their size preferences based on a width or a height afforded them. An element which contains flowed text, for example, may become shorter when made wider.
When identified, the problem may be solved by manually overriding the preferred size answer of the element or by substituting another element with different behavior. The present invention enables the layout manager to automatically adapt without manual intervention. The adaption helps eliminate the need to tailor layouts according to their content. It enables a single application to work well with a variety of display sizes.
It is another object of the invention for the newly designed elements to function with layout managers that use only the queries existing in the prior art, i.e., maximum, minimum and preferred size queries, thus being backwardly compatible.
The invention is useful where a layout must adapt to the display of many different devices. Personal Information Devices (PIDs), for example, have displays which vary greatly in size and in aspect ratio. A designer creating an application for PIDs has no opportunity to hand-craft the screens for each display. Only an automatic method, as provided by the invention, will solve the problems which occur as the size of the target display area changes.